<template>
  <div class="TransportCard">
    <div class="title">{{transportInfo.cph}} - {{transportInfo.sjxm}}</div>
    <div class="list">
      <div class="item">
        <div class="left"> <img class="img" src="@/assets/icon/car.png" alt="" srcset=""> 车牌号:</div>
        <div class="right" :title="transportInfo.cph">{{transportInfo.cph}}</div>
      </div>
      <div class="item">
        <div class="left"><img class="img" src="@/assets/icon/driver.png" alt="" srcset="">司机姓名:</div>
        <div class="right" :title="transportInfo.sjxm">{{transportInfo.sjxm}}</div>
      </div>
      <div class="item">
        <div class="left"><img class="img" src="@/assets/icon/year.png" alt="" srcset="">驾龄:</div>
        <div class="right" :title="transportInfo.driverYear">{{transportInfo.driverYear}}(年)</div>
      </div>
      <div class="item">
        <div class="left"><img class="img" src="@/assets/icon/weight.png" alt="" srcset="">载重量:</div>
        <div class="right" :title="transportInfo.kzz">{{transportInfo.kzz}}(kg)</div>
      </div>
      <div class="item">
        <div class="left"><img class="img" src="@/assets/icon/count.png" alt="" srcset="">接单数:</div>
        <div class="right" :title="transportInfo.order_count">{{transportInfo.order_count}}</div>
      </div>
      <div class="item">
        <div class="left"><img class="img" src="@/assets/icon/area.png" alt="" srcset="">地区:</div>
        <div class="right" :title="transportInfo.shi">{{transportInfo.shi}}</div>
      </div>

      <div class="item" v-if="false">
        <div class="left"><img class="img" src="@/assets/icon/car.png" alt="" srcset="">注册日期:</div>
        <div class="right">{{transportInfo.tel.RegisterDate || '无'}}</div>
      </div>
      <div class="item">
        <div class="left"><img class="img" src="@/assets/icon/flag.png" alt="" srcset="">国标:</div>
        <div class="right" :title="transportInfo.carEmission">{{transportInfo.carEmission}}</div>
      </div>
      <div class="item">
        <div class="left"><img class="img" src="@/assets/icon/phone.png" alt="" srcset="">电话:</div>
        <div class="right" :title="transportInfo.tel">{{transportInfo.tel}}</div>
      </div>
      <div class="item">
        <div class="left"><img class="img" src="@/assets/icon/type.png" alt="" srcset="">车型:</div>
        <div class="right" :title="transportInfo.car_lx">{{transportInfo.car_lx}}</div>
      </div>
    </div>
    <div class="tool" v-if="false">
      <el-button class="btn" size="small">查看详情</el-button>
    </div>
  </div>
</template>
  
  <script>
export default {
  name: "SourceCard",
  props:{
    transportInfo:{
      type:Object,
      default:()=>{}
    }
  },
  data() {
    return {
    };
  },
  mounted() {
    this.initial();
  },
  methods: {
    async initial() {}
  }
};
</script>
  
  <style lang="scss" scoped>
.TransportCard {
  min-height: 180px;
  width: 49%;
  background: #fff;
  border-radius: 10px;
  padding: 10px 20px;
  box-sizing: border-box;
  border: 1px solid #fff;
  margin: 20px 0 10px 0;

  &:hover {
    border: 1px solid $primaryColor;
    box-shadow: 0px 10px 20px 2px rgba(189, 189, 189, 0.3);
  }
  .title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 5px;
  }
  .list {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    .item {
      width: 30%;
      display: flex;
      align-items: center;
      font-size: 13px;
      margin-top: 15px;
      white-space:nowrap;
      overflow: hidden;
      .left {
        color: #999;
        margin-right: 10px;
        display: flex;
        align-items: center;
        .img{
          width: 22px;
          margin-right: 4px;
        }
      }
    }
  }
  .tool {
    display: flex;
    justify-content: flex-end;
    .btn {
      border: 1px solid $primaryColor;
      color: $primaryColor;
      &:hover {
        color: #fff;
        background: $primaryColor;
      }
    }
  }
  @media screen and (max-width: 767px) {
    width: 100%;
    .list {
      .item {
        width: 48%;
      }
    }
    .tool {
      margin-top: 10px;
    }
  }
}
</style>
  